package poswar.contribute.model;

import java.io.Serializable;

import poswar.contribute.util.FriendModeManager;


public class Answer implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private String email;
	private String text;
	private double evaluation;
	
	public static Answer build(String email, String text) {
		Answer answer = new Answer();

		answer.email = email;
		answer.text = text;
		answer.evaluation = 0.0;
		
		return answer;
	}

	public String getEmail() {
		return email;
	}

	public String getText() {
		return text;
	}

	public double getEvaluation() {
		return evaluation;
	}

	public void setEvaluation(double evaluation) {
		this.evaluation = evaluation;
	}

	public void setEmail(String email) {
		FriendModeManager.assertFriendAccess();
		this.email = email;
	}

	public void setText(String text) {
		FriendModeManager.assertFriendAccess();
		this.text = text;
	}
	
	
}
